/* adjust include_path to include PEAR */ ini_set('include_path', ini_get('include_path').':/usr/share/pear'); /* all your errors are belong to us */ error_reporting(E_ALL); /* require PEAR and the parser */ require_once('PEAR.php'); require_once('HTML/BBCodeParser.php'); /* get options from the ini file */ $config = parse_ini_file('BBCodeParser.ini', true); $options = &PEAR::getStaticProperty('HTML_BBCodeParser', '_options'); $options = $config['HTML_BBCodeParser']; unset($options); /* do yer stuff! */ $parser = new HTML_BBCodeParser(); $parser->setText(@$_GET['string']); $parser->parse(); $parsed = $parser->getParsed(); ?>